<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>main</title>
<jsp:include page="../script.jsp" />
<script language="javascript">
	function cancelTip(){
		  $.ajax({
				url			:"<%=path%>/updatelog/updatelogAjax_cancelTip_msgAction.action",
				type 		: "POST",
				dataType 	: "json",
				data		: {
				},
				success 	: function(data) {
					parent.closeSearchBox();
				},
				error		:function(){
					xbox.alert("数据正在提交，请稍候，或检查您的网络环境,确保其连接正常！");
				}
			});
	}
	function toAdd(){
		$(".currentPage").val(1);
		$("#refreshForm").attr("action","<%=path%>/updatelog/updatelog_toAdd_addAction.action");
		$("#refreshForm").submit();
	}

	function toEdit(keyId){
		$("#refreshForm").attr("action","<%=path%>/updatelog/updatelog_toEdit_editAction.action?updateLogId="+keyId);
		$("#refreshForm").submit();
	}
	$(function(){
		layer.tips("点我不再提示本次更新." , $("#iknow"), 0, 400, 1, ['background-color:#F26C4F; color:#fff;','#F26C4F']);
	});
</script>
</head>
<body>
<table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#F1F1F1" style="margin-bottom:8px">
  <tr bgcolor="#FFFFFF">
    <td height="16"><span></span></td>
  </tr>
  <tr align="right">
	<td height="36" align="center">
		<c:if test="${DEVELOP_MODEL and (sessionScope.sessionUser.userId eq 1)}"><input type='button' class="btn btn-warning" onclick="toAdd();" value='发布更新日志' /></c:if>
		<input type='button' class="btn btn-success" id="iknow" onclick="cancelTip();" value='我知道了' />
	</td>
</tr>
  <c:forEach items="${list }" var="updateLog" varStatus="status">
  	<tr>
  		<td width="90%" style="padding-left:25px;">
  			<div align="left" style="font-size: 12px;color:#FF0000;">[版本号：&nbsp;${updateLog.updateLogVersion}]&nbsp;&nbsp;&nbsp;更新日期&nbsp;&nbsp;&nbsp;<fmt:formatDate value="${updateLog.updateTime}" pattern="yyyy-MM-dd"/></div>
  			<div><hr /></div>
  			<div align="left" style="font-size: 14px;padding-bottom:10px;padding-top:10px;">${updateLog.updateLogContent}</div>
  			<div align="right">
              <c:if test="${DEVELOP_MODEL and (sessionScope.sessionUser.userId eq 1)}">[<a href="javascript:void(0);" onclick="toEdit(${updateLog.updateLogId});">编辑</a>] </c:if>
              </div>
  			<div><hr style="height: 10px;background-color: #F1F1F1" /></div>
  		</td>
  	</tr>
  </c:forEach>
</table>
<form action="<%=path%>/updatelog/updatelog_queryList_showAction.action" method="post" style="display: none;" id="refreshForm" name="refreshForm">
	<input type="hidden" name="currentPage" class="currentPage" value="${currentPage}"/>
	<input type="hidden" class="currentMenuId" name="currentMenuId" value="${currentMenuId}"/>
</form>

</body>
</html>
